# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=perl-ipc-sharelite
pkgver=0.17
pkgrel=5
pkgdesc="Lightweight interface to shared memory"
url="https://metacpan.org/pod/IPC::ShareLite"
arch="all"
license="PerlArtistic GPL"
depends=""
depends_dev=""
makedepends="$depends_dev perl-dev"
install=""
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/A/AN/ANDYA/IPC-ShareLite-$pkgver.tar.gz"

_builddir="$srcdir"/IPC-ShareLite-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="f796f6766df11205755de4672ff8a586690545ccaa2f91c3fc65f106f3b61e1cbd86ee3e97dadf787809e3be32f503670cb67dafc9b18eee30d59d8be03b5ee9  IPC-ShareLite-0.17.tar.gz"
